{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <title>{% block pagetitle %} {% endblock %}</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="//code.z01.com/v4/dist/css/zico.min.css" >
    <link rel="icon" href="{% static "imag/logo.png" %}" type="image/png"  />
    <link rel="stylesheet" type="text/css" href="{% static "bootstrap-4.6.0-dist/css/bootstrap.min.css"%}">
    <script src="{% static "bootstrap-4.6.0-dist/js/jquery-3.5.1.min.js" %}"></script>
    <script src="{% static "bootstrap-4.6.0-dist/js/jquery.cookie.js" %}"></script>
    <script type="text/javascript" src="{% static "bootstrap-4.6.0-dist/js/bootstrap.bundle.min.js" %}"></script>
    <script src="{% static "js/self.js" %}"></script>
    <link rel="stylesheet" type="text/css" href="{% static "css/style.css" %}">
    <link rel="stylesheet" type="text/css" href="{% static "css/news.css" %}">
    <link rel="stylesheet" type="text/css" href="{% static "css/movie.css" %}">
    <style>a{TEXT-DECORATION:none}</style>
</head>
<body style="background-color: #d8e3e7">

<nav class="navbar navbar-expand-lg navbar-dark bg-dark">

    <a class="navbar-brand" href="#">
        <img src="{% static "imag/logo.png" %}" width="40px">
    </a>
    <span style="font-size: 27px;color:white;position:relative;left: -10px;">斯普电影</span>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item {% block paget1 %}{% endblock %}">
                <a class="nav-link" href="/news/">主页 {% block page1 %}{% endblock %}</a>
            </li>

            <li class="nav-item {% block paget2 %}{% endblock %}">
                <a class="nav-link" href="/movie/">影片 {% block page2 %}{% endblock %}</a>
            </li>

            <li class="nav-item {% block paget3 %}{% endblock %}">
                <a class="nav-link" href="/cinema/">影院 {% block page3 %}{% endblock %}</a>
            </li>
            <li class="nav-item {% block paget4 %}{% endblock %}">
                <a class="nav-link" href="/top/">排行榜 {% block page4 %}{% endblock %}</a>
            </li>

        </ul>

        <form class="form-inline nav-item pr-5" method="get" action="/search/">
            {% csrf_token %}
            <input class="form-control mr-sm-2" type="search" placeholder="Search"  aria-label="Search"  name="keyword">
            <button class="btn btn-outline-success my-2 my-sm-0" type="submit">搜索</button>
        </form>

        <div id="logpasn" class="my-auto nav-item w-50" style="text-align: right;">

        </div>
        <!--如果未登录-->
        <div id="logbtn" class="my-auto nav-item w-50" style="text-align: right;display: none">
            <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#login_tag">登录/注册</button>
        </div>

        <!--如果已经登录-->
        <ul id="fnlog" class="dropdown my-auto nav-item w-50" style="text-align: right;display: none">
                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    <img id = "userimg" src="{% static 'user_imag/a.jpg' %}" class="rounded-circle" width="25px" height="25px">
                    <span id = "username" class="header-username">Chuck Norris</span>
                </a>
                <div class="dropdown-menu mx-5" aria-labelledby="navbarDropdown" style="left: 70%;" >
                    <a class="dropdown-item" href="/user/home/">个人中心</a>
                    <a class="dropdown-item" href="/user/session/">我的订单</a>
                    <a class="dropdown-item" href="#">设置</a>
                    <a class="dropdown-item" onclick="loginout()">退出登录</a>
                </div>

        </ul>
    </div>
</nav>


<!-- 登录弹出框 -->
<div class="modal fade" id="login_tag" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" style="margin-top: 10%;">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel" >登录</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <!--登录界面-->
{#                <div style="font-size: 25px;">登录</div>#}
                <!--form表单-->
                <form id="login-form">
                    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <span class="input-group-text" >用户名</span>
                        </div>
                        <input type="text" id="username" name="username" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default">
                    </div>
                    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <span class="input-group-text">密码 </span>
                        </div>
                        <input type="password" class="form-control" id="password" name="password" aria-label="Default" aria-describedby="inputGroup-sizing-default">
                    </div>
                    <p id="logmsg" style="color: red;"></p>
                    <a href="../user/register">还未注册，点击注册</a>
                    <button type="button" class="btn btn-primary" onclick="mysubmit()" style="margin-left: 50%;">登录</button>
                </form>

            </div>
            <div class="modal-footer">

            </div>
        </div>
    </div>
</div>

{% block content %}
{% endblock %}

   <footer class="footer navbar-fixed-bottom" style="height: auto;">
    <div class="container" style="">
        <div class="row text-center">
{#            <div class="col-12 m-auto" style="font-size: 50px;margin-left: 100px;color: #f3f4ed;">斯普电影</div>#}
{#            <div class="col-md-4">第二列</div>#}
{#            <div class="col-md-4">第三列</div>#}
        </div>

        <div class="row text-center">
            <div style="text-align: center;color: white;width: 100%;margin-top: 20px">
                <p>
                    关于斯普 :
                    <a href="" style="color: orangered">关于我们</a>
                    <span> | </span>
                    <a href="{% url 'team' %}" style="color: orangered">管理团队</a>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    友情链接 :
                    <a href="https://maoyan.com/" target="_blank" style="color: orangered">猫眼网</a>
                    <span> | </span>
                    <a href="https://www.1905.com/" target="_blank" style="color: orangered">电影网</a>

                  </p>
                <p class="friendly-links">
                    用户投诉邮箱：tousujubao@sipu.com
                    客服电话：10010001
                    违法和不良信息举报电话：4006012345
                </p>
                <p>蒙公网安备 2018202212345号
                    <span>
                        |
                    </span>
                    蒙ICP备20181234号-1
                </p>
                <p>
                    内蒙古四铺文化有限公司
                </p>
                <span class="my-footer-year">©2021 SiPu. All Rights Reserved</span>
                <div style="margin-top: 20px">
                <a href="https://www.itrust.org.cn" target="_blank">
                  <img width="110" height="50" alt="中国互联网协会" src="//i1.sinaimg.cn/home/main/index2013/footerlogo/footer_logo01.gif" data-src="//i1.sinaimg.cn/home/main/index2013/footerlogo/footer_logo01.gif"></a>
                <a href="https://www.12377.cn" target="_blank">
                  <img width="110" height="50" src="https://p0.meituan.net/scarlett/3cd2a9b7dc179531d20d27a5fd686e783787.png">
                </a>
                <a href="http://www.creditchina.gov.cn/" target="_blank">
                    <img src="//n.sinaimg.cn/default/d3f34f8d/20160421/creditchina.gif" data-src="//n.sinaimg.cn/default/d3f34f8d/20160421/creditchina.gif" width="107" height="50" alt="信用中国">
                </a>
                </div>


            </div>
{#            <div class="col-12 m-auto" style="font-size: 20px;margin-left: 100px;color: #f3f4ed;">内师大四铺文化有限公司</div>#}
            <p style="color: white;text-align: center;width: 100%">
{#                <span class="my-footer-year">©2021 SiPu. All Rights Reserved</span>#}

            </p>

{#            <div class="col-12 m-auto" style="font-size: 20px;margin-left: 100px;color: #f3f4ed;">Copyright 2021.3 - 2021.6 SoftGroup. All Rights Reserved</div>#}
            {#            <div class="col-md-4">第二列</div>#}
            {#            <div class="col-md-4">第三列</div>#}
        </div>
    </div>
    </footer>



</body>
</html>

{#<a class="navbar-brand" href="#" style="padding: 5px 5px;">#}
{#    <img src="{% static "imag/logo.png" %}" width="40px">#}
{#</a>#}
{#<span style="font-size: 27px;position:relative;top:5px;">Movie</span>#}